<script setup lang="ts">
    import { ref } from 'vue'
    let count = ref(0)

    function handleClick(num: number, event: any) {
        count.value += num
        console.log(event)
    }


</script>

<template>
    <main>
        <h1>EventHandleView</h1>
        <button @click="count++">点击</button>
        <button v-on:click="handleClick(3, $event)">点击 function inline </button>
        <button v-on:click="(e)=> handleClick(3, e)">点击 function arrow </button>
        <h2>{{ count }}</h2>
    </main>
</template>

<style scoped>

</style>